<div class="content">
	<form method="post" action="<?=n_url('open','apiSave')?>">
	<dl class="n-form" style="line-height: 26px;">


		<dt>插件:</dt>
		<dd>
			<?=$data['pinfo']['pname']?>
			<?=$data['pinfo']['pevent']?>
			<input type="hidden" name="main_id" value="<?=$data['main_id']?>" />
			&nbsp;
		</dd>

		<dt>接口:</dt>
		<dd><input type="text" name="paction" value="<?=empty($data['ainfo']['paction'])?'':$data['ainfo']['paction']?>" /></dd>
		
		<dt>标题:</dt>
		<dd><input type="text" name="title" value="<?=empty($data['ainfo']['title'])?'':$data['ainfo']['title']?>" /></dd>
		
		<dt>请求类型:</dt>
		<dd>
			<input type="radio" name="request_method" value="POST"<?=!empty($data['ainfo'])&&'POST'==$data['ainfo']['request_method']?' checked':''?> />POST
			<input type="radio" name="request_method" value="GET"<?='GET'==!empty($data['ainfo'])&&$data['ainfo']['request_method']?' checked':''?> />GET
			<input type="radio" name="request_method" value="BOTH"<?=empty($data['ainfo'])||!in_array($data['ainfo']['request_method'],array('POST','GET'))?' checked':''?> />POST & GET
		</dd>
	
		<dt>数据格式:</dt>
		<dd>
			<input type="radio" name="data_format" value="JSON"<?=!empty($data['ainfo'])&&'JSON'==$data['ainfo']['data_format']?' checked':''?> />JSON
			<input type="radio" name="data_format" value="XML"<?=!empty($data['ainfo'])&&'XML'==$data['ainfo']['data_format']?' checked':''?> />XML
			<input type="radio" name="data_format" value="BOTH"<?=empty($data['ainfo'])||!in_array($data['ainfo']['data_format'],array('JSON','XML'))?' checked':''?> />JSON & XML
		</dd>

		<dt>请求示例:</dt>
		<dd>
			<textarea name="request_example"><?=empty($data['ainfo']['request_example'])?'':$data['ainfo']['request_example']?></textarea>
		</dd>

		<dt>响应示例:</dt>
		<dd>
			<textarea name="respond_example"><?=empty($data['ainfo']['respond_example'])?'':$data['ainfo']['respond_example']?></textarea>
		</dd>

		<dt>注意:</dt>
		<dd>
			<textarea name="notice"><?=empty($data['ainfo']['notice'])?'':$data['ainfo']['notice']?></textarea>
		</dd>

		<dt>&nbsp;</dt>
		<dd>
			<?php
			if(!empty($data['id'])){
			?>
			<input type="hidden" name="id" value="<?=$data['id']?>" />
			<?php
			}
			?>
			<input type="submit" />
		</dd>
	</dl>
	</form>
</div>	
